 
import Vuex from 'vuex' 
const store = new Vuex.Store({
	state: {
		$userInfo: {
			id: 1
		},
		login: {},
		tmp:{},
		map:{},
		wxUserInfo:{},
		apiUserInfo:{},
		publishInfo:{ mode:1,propertyType:1,type:1 },
		ztLocation:{},
		ztSpace:{},
		ztPrice:{}, 
		ztPicture:{},
	},
	mutations: {
		asyncLogin(state, data) {state.login = Object.assign(state.login, data)},
		asyncTmp(state, data) {state.tmp = Object.assign(state.tmp, data)},
		asyncMap(state, data) {state.map = Object.assign(state.map, data)},
		asyncWxUserInfo(state, data) {state.wxUserInfo = Object.assign(state.wxUserInfo, data)},
		asyncApiUserInfo(state, data) {state.apiUserInfo = Object.assign(state.apiUserInfo, data)},
		asyncPublishInfo(state, data) {state.publishInfo = Object.assign(state.publishInfo, data)},
		asyncztLocation(state, data) {  state.ztLocation = Object.assign(state.ztLocation,data)  },
		asyncztSpace(state, data) {  state.ztSpace = Object.assign(state.ztSpace,data)  },
		asyncztPrice(state, data) {  state.ztPrice = Object.assign(state.ztPrice,data)  },
		asyncztPicture(state, data) {  state.ztPicture = Object.assign(state.ztPicture,data)  },
	},
	actions: {
		asyncLogin({commit}, data) {commit('asyncLogin', data)},
		asyncTmp({commit}, data) {commit('asyncTmp', data)},
		asyncMap({commit}, data) {commit('asyncMap', data)},
		asyncWxUserInfo({commit}, data) {commit('asyncWxUserInfo', data)},
		asyncApiUserInfo({commit}, data) {commit('asyncApiUserInfo', data)},
		asyncPublishInfo({commit}, data) {commit('asyncPublishInfo', data)},
		ztLocation({ commit },data){  commit('asyncztLocation',data) },
		ztSpace({ commit },data){  commit('asyncztSpace',data) },
		ztPrice({ commit },data){  commit('asyncztPrice',data) },
		ztPicture({ commit },data){  commit('asyncztPicture',data) },
	},
})

export default store
/*
 var tmp = this.$store.state.login;
 this.$store.dispatch("asyncLogin",{phone});
*/